/*
 * @Author: zhanglianchang
 * @Date: 2020-08-01 14:39:32
 * @Last Modified by: taoshiwei
 * @Last Modified time: 2019-04-29 14:53:23
 *
 * 学科有关的接口：自己写吧~~  已经被张老师删了 ^_^
 */

import { createAPI } from '@/utils/request'
export const getSubjects = params => createAPI(
  // subjectName=&page=1&pagesize=10
  '/subjects',
  'get',
  params
)

export const addSubject = data => createAPI(
  '/subjects',
  'post',
  data
)

export const reviseSubject = data => createAPI(
  `/subjects/${data.id}`,
  'put',
  data
)

export const removeSubject = data => createAPI(
  `/subjects/${data.id}`,
  'DELETE',
  data
)
// 获取学科列表的接口
export const list = () => createAPI(
  '/subjects/simple',
  'GET'
)
export const getSubject = () => createAPI('/subjects/simple', 'get')
